package com.chixing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 *
 * </p>
 *
 * @author liwenjing
 * @since 2025-10-07
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@Document(indexName = "movie_detail")
@TableName("movie_detail")
public class MovieDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 电影详情ID
     */
    @TableId(value = "movie_detail_id", type = IdType.AUTO)
    @Id
    private Integer movieDetailId;

    /**
     *  关联电影基础表电影id
     */
    private Integer movieId;

    /**
     * 电影名称
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_smart")
    private String movieName;

    /**
     * 电影预告
     */
    private String movieTrailer;

    /**
     * 电影简介
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_smart")
    private String movieIntro;

    /**
     * 电影类型
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_max_word")
    private String movieType;

    /**
     * 上映时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Field(type = FieldType.Date,

            pattern = "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis")

    private String releaseTime;

    /**
     * 上映地点
     */
    private String releaseLocation;

    /**
     * 电影时长（分钟）
     */
    private Integer duration;

    /**
     * 导演
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart", searchAnalyzer = "ik_max_word")
    private String director;

    /**
     * 演员
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String actors;


    /**
     * 票房
     */
    private BigDecimal boxOffice;

    /**
     * 评分
     */
    private BigDecimal score;

    /**
     * 图集
     */
    private String images;

    /**
     * 片长（分钟）
     */
    private Integer durationMinutes;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Field(type = FieldType.Date, format = {},
            pattern = "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis")
    private LocalDateTime updateTime;

    /**
     * 状态（1=热映中，0=已下映，2=未上映）
     */
    private Integer statues;

    /**
     * 版本号
     */
    private Integer version;

    /**
     * 其他字段1
     */
    private String movieImage;

    /**
     * 其他字段2
     */
    private String other2;

    public Integer getMovieDetailId() {
        return movieDetailId;
    }

    public void setMovieDetailId(Integer movieDetailId) {
        this.movieDetailId = movieDetailId;
    }
    public Integer getMovieId() {
        return movieId;
    }

    public void setMovieId(Integer movieId) {
        this.movieId = movieId;
    }
    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }
    public String getMovieTrailer() {
        return movieTrailer;
    }

    public void setMovieTrailer(String movieTrailer) {
        this.movieTrailer = movieTrailer;
    }
    public String getMovieIntro() {
        return movieIntro;
    }

    public void setMovieIntro(String movieIntro) {
        this.movieIntro = movieIntro;
    }
    public String getMovieType() {
        return movieType;
    }

    public void setMovieType(String movieType) {
        this.movieType = movieType;
    }
    public String getReleaseTime() {
        return releaseTime;
    }

    public void setReleaseTime(String releaseTime) {
        this.releaseTime = releaseTime;
    }
    public String getReleaseLocation() {
        return releaseLocation;
    }

    public void setReleaseLocation(String releaseLocation) {
        this.releaseLocation = releaseLocation;
    }
    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }
    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }
    public String getActors() {
        return actors;
    }

    public void setActors(String actors) {
        this.actors = actors;
    }
    public BigDecimal getBoxOffice() {
        return boxOffice;
    }

    public void setBoxOffice(BigDecimal boxOffice) {
        this.boxOffice = boxOffice;
    }
    public BigDecimal getScore() {
        return score;
    }

    public void setScore(BigDecimal score) {
        this.score = score;
    }
    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }
    public Integer getDurationMinutes() {
        return durationMinutes;
    }

    public void setDurationMinutes(Integer durationMinutes) {
        this.durationMinutes = durationMinutes;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
    public Integer getStatues() {
        return statues;
    }

    public void setStatues(Integer statues) {
        this.statues = statues;
    }
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getMovieImage() {
        return movieImage;
    }

    public void setMovieImage(String movieImage) {
        this.movieImage = movieImage;
    }

    public String getOther2() {
        return other2;
    }

    public void setOther2(String other2) {
        this.other2 = other2;
    }

    @Override
    public String toString() {
        return "MovieDetail{" +
                "movieDetailId=" + movieDetailId +
                ", movieId=" + movieId +
                ", movieName=" + movieName +
                ", movieTrailer=" + movieTrailer +
                ", movieIntro=" + movieIntro +
                ", movieType=" + movieType +
                ", releaseTime=" + releaseTime +
                ", releaseLocation=" + releaseLocation +
                ", duration=" + duration +
                ", director=" + director +
                ", actors=" + actors +
                ", boxOffice=" + boxOffice +
                ", score=" + score +
                ", images=" + images +
                ", durationMinutes=" + durationMinutes +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", statues=" + statues +
                ", version=" + version +
                ", movieImage=" + movieImage +
                ", other2=" + other2 +
                "}";
    }
}
